package com.hotel.sampleTool;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.datastore.EntityNotFoundException;
import com.hotel.BL.RoomTypeLogic;

import data.RoomType;

public class RoomTypeSample extends RequestSampleData {
	public RoomTypeSample(HttpServletRequest req,HttpServletResponse resp){
		this.req = req;
		this.resp = resp;
	}
	@Override
	public void CreateSample() {
		CreateSample(1);
	}

	@Override
	public void CreateSample(int iteration) {
		RoomTypeLogic roomTypeLogic = new RoomTypeLogic(req,resp);
		List<RoomType> roomtype = null;
		try {
			roomtype = roomTypeLogic.GenerateRoomType(1);
		} catch (EntityNotFoundException e) {
			// TODO Auto-generated catch block
		}
		for(RoomType a : roomtype)
			datastore.put(a.getEntity());
	}


}
